from toee import *
from py00439script_daemon import record_time_stamp, get_v, set_v, npc_set, npc_unset, npc_get, tsc, within_rect_by_corners

def san_dying( attachee, triggerer ):
	if attachee.name == 14248:
		# Ogre Chief
		record_time_stamp(505)
		record_time_stamp(508)
		set_v(499, get_v(499) + 1 )
		if get_v(499) >= 20:
			record_time_stamp(510)
	if attachee.name == 14156:
		# Earth Commander
		record_time_stamp(506)
		record_time_stamp(507)
		set_v(500, get_v(500) + 1 )
		if get_v(500) >= 10:
			record_time_stamp(511)
	if attachee.name == 8045:
		# Romag
		#actually, he already has a san_dying of his own, so no need for this one
		#we'll keep it as "infrastructure"
		record_time_stamp(456)

	if attachee.name == 14154:
		# Hartsch
		record_time_stamp(506)
		set_v(500, get_v(500) + 1 )
		if get_v(500) >= 10:
			record_time_stamp(511)
	return RUN_DEFAULT